package common.inter;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;
import com.jfinal.wxaapp.WxaConfigKit;

import common.kit.PropKits;

public class WxaAppIdInter implements Interceptor{

	@Override
	public void intercept(Invocation inv) {
		Controller con = inv.getController() ;
		String appId = con.getPara("appId" , PropKits.getSmallAppId() ) ;
		WxaConfigKit.setThreadLocalAppId(appId) ;
		inv.invoke() ;
		WxaConfigKit.removeThreadLocalAppId() ;
	}

}
